n = 10
sum = 0
while n > 1:
    val = 1
    for i in range(n):
        val = val * (i + 1)
    sum += val
    n -= 1
    if n == 1:
        sum += 1
print("1到10的阶层之和：", sum)